define(["jquery", "easy-admin"], function ($, ea) {

    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'jizhan.page_link_product/index?id='+pageLinkId,
        add_url: 'jizhan.page_link_product/add?id='+pageLinkId,
        edit_url: 'jizhan.page_link_product/edit',
        delete_url: 'jizhan.page_link_product/delete',
        export_url: 'jizhan.page_link_product/export',
        modify_url: 'jizhan.page_link_product/modify',
        product_url: 'jizhan.page_link_product/product',
    };
    var Controller = {

        index: function () {
            ea.table.render({
                init: init,
                cols: [[
                    {type: "checkbox"},
                    {field: 'id', width: 30, title: 'ID', search: 'no'},
                    {field: 'store_name', width: 150, title: '商品短标题'},
                    {field: 'english_store_name', width: 150, title: '商品英文标题'},
                    {field: 'product_info', title: '商品信息', search: 'no'},
                    {field: 'create_time', minWidth: 120, title: '创建时间', search: 'no'},
                    {width: 250, title: '操作', templet: ea.table.tool, operat: ['edit','delete']}
                ]],
            });

            ea.listen();
        },
        add: function () {
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});